package com.fjec.user.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fjec.common.protocol.JsonResult;
import com.fjec.user.entity.SysUser;

/**
 * <p>
 * 002.用户表 服务类
 * </p>
 *
 * @author admin
 * @since 2020-08-31
 */
public interface ISysUserService extends IService<SysUser> {

    JsonResult saveUser(SysUser sysUser);

    JsonResult updateUser(SysUser sysUser);

    SysUser getUserByName(String userName);

    JsonResult getUsersPage(Page page);

    /**
     * 根据openid获取用户信息
     *
     * @param userAppId
     * @param appType
     * @return
     */
    SysUser getSysUserByUserAppId(String userAppId, Integer appType);

    /**
     * 修改注册用户电话号码
     *
     * @param userId
     * @param phone
     */
    int updateUserPhone(Long userId, String phone);

    String getOpenIdByUserId(Long userId);
}
